{template '_header'}
{php $this->followBar()}
<link rel="stylesheet" href="../addons/ewei_shopv2/plugin/groups/template/mobile/default/css/style.css" />
<div class='fui-page creditshop-index-page'>
	{if is_h5app()}
	<div class="fui-header">
		<div class="fui-header-left"></div>
		<div class="title">{php echo m('plugin')->getName('groups')}</div>
		<div class="fui-header-right"></div>
	</div>
	{/if}
	<div class='fui-content navbar'>

		<div class='fui-swipe' data-transition="500" data-gap="1">
		    <div class='fui-swipe-wrapper'>
			{loop $advs $adv}
				<a class='fui-swipe-item' href="{if !empty($adv['link'])}{$adv['link']}{else}javascript:;{/if}">
					<img src="{php echo tomedia($adv['thumb'])}" alt="{$adv['advname']}" onerror="this.src='../addons/ewei_shopv2/static/images/nopic100.jpg'"/>
				</a>
			{/loop}
		    </div>
		    <div class='fui-swipe-page'></div>
		</div>
		{if count($category)>0}
		<div class="lynn_index_menu row">
			{loop $category $cate}
			<a href="{php echo mobileUrl('groups/category', array('category'=>$cate['id']))}">
				<img src="{$cate['thumb']}" alt="{$cate['name']}" onerror="this.src='../addons/ewei_shopv2/static/images/nopic100.jpg'">
				<p>{$cate['name']}</p>
			</a>
			{/loop}
		</div>
		{/if}
		<div class="lynn_item"></div>
		<div class="lynn_index_rec">
			<p><i></i><span>正在热卖</span></p>
			<span>H O T S A L E</span>
		</div>
		{if count($recgoods)>0}
		<ul class="lynn_index_list_ul row">
			{loop $recgoods $item}
			<li class="lynn_index_list_li fui-list goods-list">
				<a href="{php echo mobileUrl('groups/goods', array('id'=>$item['id']))}" class="external lynn_index_list_a fui-list-media">
					<img src="{php echo tomedia($item['thumb'])}" alt="{$item['title']}" onerror="this.src='../addons/ewei_shopv2/static/images/nopic100.jpg'">
				</a>
				<div class="lynn_index_list_info fui-list-inner" onclick="window.location.href='{php echo mobileUrl('groups/goods', array('id'=>$item['id']))}';">
					<h3>{$item['title']}</h3>
					<p>{$item['description']}</p>
					<del>原价：¥{$item['price']}</del>
					<div class="lynn_index_list_team">
						<span class="lynn_index_list_team_left">
							<strong><i class="icon icon-group"></i></strong>{$item['groupnum']}人团 ¥<em>{$item['groupsprice']}</em>/{$item['goodsnum']}{if $item['units']}{$item['units']}{else}件{/if}
						</span>
						<a href="{php echo mobileUrl('groups/goods', array('id'=>$item['id']))}" class="external lynn_index_list_team_a">去拼团 ></a>
					</div>
				</div>
			</li>
			{/loop}
		</ul>
		{else}
		<div class="fui-message fui-message-popup in">
			<div class="icon ">
				<i class="icon icon-information"></i>
			</div>
			<div class="content">暂无任何活动</div>
		</div>
		{/if}

	</div>
</div>
{php $this->footerMenus()}
{template '_footer'}